package com.hxc.common.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Data
@Component
@ConfigurationProperties(prefix = "email", ignoreUnknownFields = false)
public class EmailConfig {
    private String host;
    private Integer port;
    private String username;
    private String password;
    private String protocol;
    private String defaultEncoding;
    private String receiveHost;
    private String receivePort;
    private String receiveUsername;
    private String receivePassword;
    private String receiveProtocol;

    @Override
    public String toString() {
        return "EmailConfig{" +
                "host='" + host + '\'' +
                "port='" + port + '\'' +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", protocol='" + protocol + '\'' +
                ", defaultEncoding='" + defaultEncoding + '\'' +
                ", receiveHost='" + receiveHost + '\'' +
                ", receivePort='" + receivePort + '\'' +
                ", receiveUsername='" + receiveUsername + '\'' +
                ", receivePassword='" + receivePassword + '\'' +
                ", receiveProtocol='" + receiveProtocol + '\'' +
                '}';
    }
}
